package cn.cloud.project.openfeign.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * url形式，该形式没有负载均衡能力
 * 这种形式也要配置name参数
 */
@FeignClient(url = "127.0.0.1:9092", name = "provider", contextId = "provider2ApiClient")
public interface Provider2ApiClient {

    /**
     * 如果有参数，一定要加@RequestParam注解
     */
    @GetMapping("/openApi/test")
    String test(@RequestParam("id") String id);


}
